package com.oxymore.jbnetapi.wow.guild;

import java.util.List;

import com.oxymore.jbnetapi.core.ApiResponse;
import com.oxymore.jbnetapi.wow.character.Profile;

/**
 * Contains all the information on a guild
 * 
 * @author Valentin
 */
public class Guild extends ApiResponse
{

    private String       name;
    private int          level;
    private String       side;
    private int          achievementPoints;
    private Emblem       emblem;
    private List<Member> members;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getSide() {
        return side;
    }

    public void setSide(String side) {
        this.side = side;
    }

    public int getAchievementPoints() {
        return achievementPoints;
    }

    public void setAchievementPoints(int achievementPoints) {
        this.achievementPoints = achievementPoints;
    }

    public Emblem getEmblem() {
        return emblem;
    }

    public void setEmblem(Emblem emblem) {
        this.emblem = emblem;
    }

    @SuppressWarnings("unchecked")
    public List<Member> getMembers() {

        return members;
    }

    public void setMembers(List<Member> members) {
        this.members = members;
    }

    @Override
    public String toString() {
        return "Guild [name=" + name + ", level=" + level + ", side=" + side
                + ", achievementPoints=" + achievementPoints + ", emblem="
                + emblem + ", members=" + members + "]";
    }

    public static class Member
    {

        private Profile character;
        private int     rank;

        public Profile getCharacter() {
            return character;
        }

        public void setCharacter(Profile character) {
            this.character = character;
        }

        public int getRank() {
            return rank;
        }

        public void setRank(int rank) {
            this.rank = rank;
        }

        @Override
        public String toString() {
            return "Member [character=" + character + ", rank=" + rank + "]";
        }
    }
}